package day03;

public class OperDemo5 {
    public static void main(String[] args) {
        //5.字符串的连接:  +
        int age=39;
        System.out.println("age=");//age=
        System.out.println(age);//39
        System.out.println("age="+age);//age=39
        System.out.println("我今年"+age+"岁了");//我今年39岁了
        String name="yyy";
        System.out.println("我叫"+name);//我叫yyy
        System.out.println("我叫"+name+"，今年"+age+"岁了");//我叫yyy，今年39岁了
        //任意类型+字符串类型，都变为字符串类型
        System.out.println(10+20+30+"");//60------String
        System.out.println(10+20+""+30);//3030----String
        System.out.println(""+10+20+30);//102030--String

        System.out.println(""+10+20+30+40+50+60);//102030405060
        System.out.println(10+""+20+30+40+50+60);//102030405060
        System.out.println(10+20+""+30+40+50+60);//3030405060
        System.out.println(10+20+30+""+40+50+60);//60405060
        System.out.println(10+20+30+40+""+50+60);//1005060
        System.out.println(10+20+30+40+50+""+60);//15060
        System.out.println(10+20+30+40+50+60+"");//210
    }
}
